﻿import request from '/@/utils/request';
enum Api {
  AddDeviceLog = '/api/deviceLog/add',
  DeleteDeviceLog = '/api/deviceLog/delete',
  UpdateDeviceLog = '/api/deviceLog/update',
  PageDeviceLog = '/api/deviceLog/page',
  DetailDeviceLog = '/api/deviceLog/detail',
  GetDeviceGateWayGateWayIdDropdown = '/api/deviceLog/DeviceGateWayGateWayIdDropdown',
  GetDeviceInfoDeviceIdDropdown = '/api/deviceLog/DeviceInfoDeviceIdDropdown',
}

// 增加设备运行日志
export const addDeviceLog = (params?: any) =>
	request({
		url: Api.AddDeviceLog,
		method: 'post',
		data: params,
	});

// 删除设备运行日志
export const deleteDeviceLog = (params?: any) => 
	request({
			url: Api.DeleteDeviceLog,
			method: 'post',
			data: params,
		});

// 编辑设备运行日志
export const updateDeviceLog = (params?: any) => 
	request({
			url: Api.UpdateDeviceLog,
			method: 'post',
			data: params,
		});

// 分页查询设备运行日志
export const pageDeviceLog = (params?: any) => 
	request({
			url: Api.PageDeviceLog,
			method: 'post',
			data: params,
		});

// 详情设备运行日志
export const detailDeviceLog = (id: any) => 
	request({
			url: Api.DetailDeviceLog,
			method: 'get',
			data: { id },
		});

export const getDeviceGateWayGateWayIdDropdown = () =>
		request({
		url: Api.GetDeviceGateWayGateWayIdDropdown,
		method: 'get'
		});
export const getDeviceInfoDeviceIdDropdown = () =>
		request({
		url: Api.GetDeviceInfoDeviceIdDropdown,
		method: 'get'
		});

